home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RIFxLib.doc < prev    next >
Encoding:
Text File  |  1995-01-28  |  7.9 KB  |  191 lines

  1. -----------------------------------------------------------------------------
  2. ====                     RI FX Library V1.2 (C)1994              ====
  3. -----------------------------------------------------------------------------
  4.  
  5.              Written By Stephen McNamara (help from Steven Matty)
  6.                         ©1994 Leading Edge Software
  7.  
  8.  
  9. Note: The library has had a lot of the commands inside it expanded so that
  10. they work on any size bitmap.  At the moment the following, though, will
  11. only work on lorez bitmaps: ZoomX8, Derez and ZoomXY
  12.  
  13. None of the commands in this library use the blitter chip.
  14. Also note that the maximum bitmap depth for these functions is 8.
  15.  
  16. Command list:
  17.     FadeInBitmap source#,dest#,delay[,offset1,offset2,height]
  18.     ClearBitmap source#,delay[,offset,height]
  19.     ZoomX2 source#,dest#,add_source,add_dest,width,height
  20.     ZoomX4 source#,dest#,add_source,add_dest,width,height
  21.     ZoomX8 source#,dest#,add_source,add_dest,width,height
  22.     addval.w=ADDValue(bitmap#,x,y)
  23.     InitZoomXY source#,dest#,add_source,add_dest
  24.     ZoomXY xzoom_value,yzoom_value,height
  25.     Derez source#,dest#,add_source,add_dest,derez_value,height
  26.  
  27.  
  28. This two commands have been removed from this library to reduce its size.
  29. If you need or want these commands then just mail me or Steve and we'll
  30. sort something out for you.
  31. (Slow)    PlanarToChunky bitmap_addr,dest_address,width,height,depth
  32. (Slow)    ChunkyToPlanar source_address,bitmap_addr,width,height,depth
  33.  
  34.  
  35. Statement: FadeInBitmap
  36. ========================================================================
  37. Modes : Amiga/Blitz
  38. Syntax: FadeInBitmap source#,dest#,delay[,offset1,offset2,height]
  39.  
  40.   This is used to make an any width, any height, bitmap appear on another
  41.   one in a nice way.  Source# and dest# should be bitmap object numbers
  42.    and delay is the 'slow-down' value for the fade.  This is necessary
  43.   because this routine works very fast - at full speed it looks just like
  44.   a slow screen copy.  You should note that the delay is taken as being a
  45.   word, thus don't pass 0 or you'll actually get a delay of 65535.  This
  46.   routine will adjust itself to take into account the depth of the bitmap,
  47.   WARNING: the depth of the destination bitmap should be AT LEAST as big
  48.   as the depth of the source# bitmap because the depth of the fade is taken
  49.   from the source# bitmap.
  50.   The optional parameters in this command allow you to set respectively:
  51.   the source bitmap y offset, the destination bitmap y offset and the
  52.   height of the fade (in pixels).  If these parameters are left out then
  53.   the fade automatically occurs across the full size of the bitmap.
  54.   
  55.   See: ClearBitmap
  56.  
  57. Statement: ClearBitmap
  58. ========================================================================
  59. Modes : Amiga/Blitz
  60. Syntax: ClearBitmap source#,delay[,offset,height]
  61.  
  62.   This is used to clear an any width, any height, bitmap in a very pleasant
  63.   way.  The parameters are the same as for FadeInBitmap except that
  64.   only one bitmap is needed.  The delay parameter i used for the same
  65.   reason as in FadeInBitmap - to slow down the effect.  The optional
  66.   parameters allow you to set a y start value for the clear and the
  67.   height (in pixels) of the clear.
  68.  
  69.   See: FadeInBitmap
  70.  
  71. Statement: ZoomX2
  72. ========================================================================
  73. Modes : Amiga/Blitz
  74. Syntax: ZoomX2 source#,dest#,add_source,add_dest,width,height
  75.  
  76.   This command does a very fast X2 zoom.  It works with two bitmaps - one
  77.   source and one dest (note: these can be the same bitmap but you should
  78.   be careful that the zoom is not done over the source data).  The two
  79.   parameters add_source and add_dest allow you to specify the position of
  80.   the start of the zoom, they specified as byte offsets from the top left
  81.   corner of the bitmaps (byte 0).  These values can be calculated by the
  82.   following method:
  83.  
  84.     add_source=(Y x BITMAP_WIDTH (in bytes) + (X / 8)
  85.  
  86.   or by using the built in command ADDValue.  Width and height are both
  87.   specified in pixels.
  88.  
  89.   NOTE: There is no clipping on this command - be careful not to zoom off
  90.         the edges of bitmaps.
  91.   You can zoom from a bitmap to a different size bitmap BUT the
  92.   destination bitmap must be as deep as the source and big enough
  93.   to hold the zoomed data.
  94.  
  95.   See: ZoomX4, ZoomX8 and ADDValue
  96.  
  97. Statement: ZoomX4
  98. ========================================================================
  99. Modes : Amiga/Blitz
  100. Syntax: ZoomX4 source#,dest#,add_source,add_dest,width,height
  101.  
  102.   This is exactly the same as ZoomX2 except that a times 4 zoom is done
  103.   by this command.
  104.  
  105.   Note: You can zoom from a bitmap to a different size bitmap BUT the
  106.   destination bitmap must be as deep as the source and big enough
  107.   to hold the zoomed data.
  108.  
  109.   See: ZoomX2, ADDValue
  110.  
  111. Statement: ZoomX8
  112. ========================================================================
  113. Modes : Amiga/Blitz
  114. Syntax: ZoomX8 source#,dest#,add_source,add_dest,width,height
  115.  
  116.   This is exactly the same as ZoomX2 except that a times 8 zoom is done
  117.   by this command
  118.  
  119.   See: ZoomX2, ADDValue
  120.  
  121. Function: ADDValue
  122. ========================================================================
  123. Modes : Amiga/Blitz
  124. Syntax: addval.w=ADDValue(bitmap#,x,y)
  125.  
  126.   This function can be used the calculate the add_source and add_dest
  127.   values used in all the zoom commands.  Just give the bitmap number, x
  128.   co-ordinate and the y co-ordinate and you'll get an answer back that can
  129.   be used straight in the ZoomXn commands.
  130.  
  131.   See: ZoomX2, ZoomX4, ZoomX8 and ZoomXY
  132.  
  133. Statement: InitZoomXY
  134. ========================================================================
  135. Modes : Amiga/Blitz
  136. Syntax: InitZoomXY source#,dest#,add_source,add_dest
  137.  
  138.   This command initialises the ZoomXY routine to the bitmaps you want it
  139.   to work on.  You MUST use this routine before calling ZoomXY.  The
  140.   parameters are the same as the first four parameter for the ZoomXn
  141.   commands - source and dest bitmaps and add_source/dest values.
  142.  
  143.   See: ZoomXY
  144.  
  145. Statement: ZoomXY
  146. ========================================================================
  147. Modes : Amiga/Blitz
  148. Syntax: ZoomXY xzoom_value,yzoom_value,height
  149.  
  150.   This command does a zoom based on the values you give it.  You should
  151.   note, though, that zoom values should be integer values (no fractional
  152.   part).  The height is the height in pixels that the source data should be
  153.   zomed to.  Please note that this command is different to the other zoom
  154.   commands in that the output of it is clipped to fit inside 320 pixels.
  155.  
  156.   This command should only be used after InitZoomXY has been called.
  157.   This routine has an extra feature in that if you give both zoom values
  158.   as 1 then a bitmap copy is done from the source to the dest using the
  159.   offsets given and the height.
  160.  
  161.   See: InitZoomXY
  162.  
  163. Statement: Derez
  164. ========================================================================
  165. Modes : Amiga/Blitz
  166. Syntax: Derez source#,dest#,add_source,add_dest,derez_value,height
  167.  
  168.   This command is used to derez a low resolution bitmap onto another one.
  169.   The bitmaps are source# and dest#, add_source and add_dest are used to
  170.   control the start position of the derez (see ZoomX2 and ADDValue to see
  171.   how these are calculated).  The derez value if obviously the amount that
  172.   each pixel will be derezed to in both the x and y directions, the height
  173.   is the height of the derez - the derez is clipped to fit inside this in 
  174.   the y direction and inside 320 pixels in the x direction.
  175.   This routine has an extra feature in that if you give derez_value as 1
  176.   then a bitmap copy is done from the source to the dest using the offsets
  177.   given and the height.
  178.  
  179. Statement: ReduceX2
  180. ========================================================================
  181. Modes : Amiga/Blitz
  182. Syntax: ReduceX2 source#,dest#,add_source,add_dest,width,height
  183.  
  184.   This command halves the given rectangle of one bitmap and pastes it onto
  185. the destination bitmap.  Width should be a multiple of 16, width and height
  186. should describe a rectangular area that will be reduced (these values
  187. should be in pixels).
  188.  
  189.   See ZoomX2 and other commands for more information about the syntax of
  190. this command.
  191.